// 管理整个项目的所有接口
import http from "./http";

// 首页轮播数据
export const getBannerApi = (params) => http.get("/home/banner", params);

// 首页推荐
export const getRecommendApi = (data) => http.post("/home/recommend", data);

// 分类数据/classify
export const getClassifyApi = (data) => http.post("/classify", data);

// 详情页数据
export const getDetailApi = (data) => http.post("/detail", data);

// 获取短信验证码
export const getCodeApi = (data) => http.post("/register/getCode", data);

// 注册或登录
export const loginApi = (data) => http.post("/register", data);

// 获得个人信息
export const getUserInfoApi = (data) => http.post("/userinfo/get", data);

// 修改个人信息
export const updateUserInfoApi = (data) => http.post("/userinfo/update", data);

// 获取收货地址
export const getAddressApi = (data) => http.post("/address/get", data);

// 新增收货地址
export const addAddressApi = (data) => http.post("/address/add", data);

// 修改收货地址
export const updateAddressApi = (data) => http.post("/address/update", data);

// 加入购物车
export const addCartApi = (data) => http.post("/cart/add", data);

// 获得购物车列表
export const getCartApi = (data) => http.post("/cart/get", data);


